FROM python:3.9.13-slim-buster
WORKDIR /app
COPY script/ /app
RUN ls -la /app/*
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN python download_kubectl.py
RUN chmod +x /usr/local/bin/kubectl
RUN chmod +x kubectl_check.sh
RUN mkdir -p /root/.kube
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENTRYPOINT ["sh"]
CMD ["kubectl_check.sh"]
